import request from '@/utils/request';

/**
 * 企业注册
 */
export async function register(params = {}) {
    return request(
        `/api/v1/company`,
        {
            method: 'POST',
            body: params,
        }
    );
}

/**
 * 重置密码
 */
export async function reset(params = {}) {
    return request(
        `/api/v1/user/reset/${params.id}`,
        {
            method: 'POST',
            body: params,
        }
    );
}

/**
 * 修改密码
 */
export async function editpwd(params = {}) {
    return request(
        `/api/v1/user/editpwd`,
        {
            method: 'POST',
            body: params,
        }
    );
}

/**
 * 检查用户状态
 * @returns {Promise<void>}
 */
export async function checkUser() {
    return request(
        `/api/v1/user/checkUser`
    )
}

/**
 * 重置密码
 */
export async function editpwd2(params = {}) {
    return request(
        `/api/v1/user/editpwd2`,
        {
            method: 'POST',
            body: params,
        }
    );
}
